﻿/*******************************************************
 *
 * CLR版本：4.0.30319.42000
 * 说明：
 *
 * 历史记录：
 *     创建文件 Luomg 2021-08-23
 *
*******************************************************/

namespace EventBus {
    public interface IEventBus {
        void Publish(IntegrationEvent @event);
        void Subscribe<T, TH>()
            where T : IntegrationEvent
            where TH : IIntegrationEventHandler<T>;
        void SubscribeDynamic<TH>(string eventName)
            where TH : IDynamicIntegrationEventHandler;
        void UnsubscribeDynamic<TH>(string eventName)
            where TH : IDynamicIntegrationEventHandler;
        void Unsubscribe<T, TH>()
            where TH : IIntegrationEventHandler<T>
            where T : IntegrationEvent;
    }
}